import { getRequest, postRequest, deleteRequest,getDownload } from '/src/lib/axios';

export const eduApi = {
    getOrgsFetch: (param) => {
        return getRequest('/orgs/fetch', param);
    },
    getOrgsTree: () => {
        return getRequest('/orgs/tree');
    },
    getfindList: () => {
        return getRequest('/config/expandattrs/findList?resources=org');
    },
    orgsAdd: (param) => {
        return postRequest('/orgs/add', param);
    },
    orgsUpdate: (param) => {
        return postRequest('/orgs/update', param);
    },
    
    orgsDeleteById: (id) => {
        return deleteRequest('/orgs/delete?ids=' + id);
    },

    // http://192.168.15.79:9526/maxkey-mgt-api/orgs/export/template
    exportDownload: () => {
        return getDownload('/orgs/export/template');
    },
    // http://192.168.15.79:9526/maxkey-mgt-api/orgs/export/org
    exportDownloadOrg: () => {
        return getDownload('/orgs/export/org');
    },
    // http://192.168.15.79:9526/maxkey-mgt-api/orgs/import
    orgsImport: () => {
        return postRequest('/orgs/import');
    },
};
